﻿using FictionsDownload.DAL;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FictionsDownload.Model
{
    public class BaseModel
    {
        public BaseModel()
        {
            AutoId = 0;
            Id = Guid.NewGuid().ToString("N");
            CreateTime = DateTime.Now;
            ActiveTime = DateTime.Now;
            SortIndex = 0;
        }
        //排序Index
        public int SortIndex { get; set; }
        /// <summary>
        /// 自增ID
        /// </summary>
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int AutoId { get; set; }
        /// <summary>
        /// UUID
        /// </summary>
        [Display(Name ="ID")]
        [Key]
        public string Id { get; set; }
        [Display(Name = "创建时间")]
        public DateTime CreateTime { get; set; }
        [Display(Name = "更新时间")]
        public DateTime ActiveTime { get; set; }
    }
}
